#define  _CRT_SECURE_NO_WARNINGS
bool is_Symmetric(struct TreeNode* left, struct TreeNode* right)
{
    if (left == NULL && right == NULL)
    {
        return true;
    }
    if ((left == NULL) || (right == NULL))
    {
        return false;
    }
    if (left->val != right->val)
    {
        return false;
    }
    return is_Symmetric(left->left, right->right) && is_Symmetric(left->right, right->left);
}

bool isSymmetric(struct TreeNode* root) {
    return is_Symmetric(root->left, root->right);
}